#include "Volume.h"
#include "FileManager.h"
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char ** argv)
{

	if (argc < 6)
	{
		fprintf(stderr,"reduceVolume old_name new_name new_x new_y new_z\n");
		return -1;
	}

        volume_t volume;

        /* Init Volume */
        float pos[3] = {0.0, 0.0, 0.0};
        readHDF5(argv[1], "value", &volume);
        setPositionVolume(&volume, pos);

	fprintf(stdout,"Volumen leido\n");

	int  x = atoi(argv[3]);
	int  y = atoi(argv[4]);
	int  z = atoi(argv[5]);
	
	CreateFile(&volume, argv[2], "value", x, y, z);

	return 0;
}
